 <?php
class LoginAuth extends CFormModel{
	

	public $primary;
	public $username;
	public $stateData;
		
	protected $_identity;
	
	public function init(){
		$this->_identity = new LoginIdentity($this);
	}
	
	public function identity(){
		return $this->_identity;
	}
	
	public function setPrimary($primary){
		$this->primary = $primary;
		return $this;
	}
	
	public function getPrimary(){
		return $this->primary;
	}
	
	public function setUsername($name){
		$this->username = $name;
		return $this;
	}
	
	public function getUsername(){
		return $this->username;
	}
	
	public function valid(){
		return $this->validate();
	}
		
	public function setState($name,$value){
		$this->stateData[$name] = $value;
		return $this;
	}
	
	
}